package com.jbm.onehome.iface;

import com.jbm.core.iface.IAcross;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by lyh on 2017-04-27.
 */
@Entity
@Table(name = "app_judge", schema = "", catalog = "")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
public class AppJudgeEntity extends IAcross
{
	public AppJudgeEntity()
	{
		super();
	}

	public AppJudgeEntity(IAcross ia)
	{
		super(ia);
	}

    private int appjudId;
    private int loginId;
    private String keyword;
    private String type;
    private String status;
    private String message;
    private Timestamp createDate;

    @Id
    @Column(name = "appjud_id")
    @GeneratedValue
    public int getAppjudId() {
        return appjudId;
    }

    public void setAppjudId(int appjudId) {
        this.appjudId = appjudId;
    }

    @Basic
    @Column(name = "login_id")
    public int getLoginId() {
        return loginId;
    }

    public void setLoginId(int loginId) {
        this.loginId = loginId;
    }

    @Basic
    @Column(name = "keyword", nullable = true,  updatable = true, length = 200)
    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    @Basic
    @Column(name = "type", length = 20)
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "status", length = 20)
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "message", nullable = true,  updatable = true, length = 1000)
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Basic
    @Column(name = "create_date", nullable = true,  updatable = true)
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AppJudgeEntity that = (AppJudgeEntity) o;

        if (appjudId != that.appjudId) return false;
        if (loginId != that.loginId) return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (keyword != null ? !keyword.equals(that.keyword) : that.keyword != null) return false;
        if (message != null ? !message.equals(that.message) : that.message != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = appjudId;
        result = 31 * result + loginId;
        result = 31 * result + (keyword != null ? keyword.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (message != null ? message.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        return result;
    }
}
